﻿//-----------------------------------------------------------------------
// <copyright file="IModelTemplate.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the IModelTemplate interface.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Rules.CodeGen
{
    /// <summary>
    /// Interface for template components.   These components are used by the 
    /// Generator to implement an executable Tuple list comprehension monad based on a 
    /// given Tulip Rules Model.
    /// </summary>
    /// <remarks>A Tulip Rules Model captures only an abstract description of the monad 
    /// in terms of a function set, types, tuple types, etc.   Template components
    /// are is used to implement the monad in a specific fashion.   Templatess will 
    /// typically be specific to a given kind of Rule Set - e.g.,  to a particular 
    /// high-level rule language designed to be executed by a specific  rule engine.
    /// These components deal with highly specific aspects of monad  implementation - 
    /// e.g., the use of timestamps for breadth-first searches.   In some cases, they 
    /// may be able to implement Monads that effectivly translate Rule Sets designed 
    /// for one engine into Monads that emulate another engine.   However, the scope 
    /// for this will be limited due to the typical complexity of side effects within 
    /// any one given engine.</remarks>
    public interface IModelTemplate
    {
        /// <summary>
        /// Registers the template with the code generator.
        /// </summary>
        /// <param name="generator">Source generator object.</param>
        void RegisterWithGenerator(Generator generator);
    }
}